<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>async-await</title>
</head>
<body>
<script src="../js/axios.js"></script>
<script>

    axios.defaults.baseURL = 'http://localhost:8090/'
    //async表示方法
    async function hello() {
        //await定义请求，然后无需then，直接拿变量接收返回值
       const {data:result} = await axios.get('hello')
        console.log(result)
    }

    hello()
</script>
</body>
</html>